<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace AlibabaCloud\Client;

class Encode
{
    private $data;
    public static function create(array $data)
    {
        return new static($data);
    }
    private function __construct(array $data)
    {
        $this->data = $data;
    }
    public function toString()
    {
        $string = "";
        foreach ($this->data as $key => $value) {
            $encode = rawurlencode($value);
            $string .= $key . "=" . $encode . "&";
        }
        if(0 < count($this->data)) {
            $string = substr($string, 0, -1);
        }
        return $string;
    }
    public function ksort()
    {
        ksort($this->data);
        return $this;
    }
}

?>